package noname;

public class Demo02 {
    public static void main(String[] args) {
        Animal a1 = new Animal("小白");
        feed(a1);


        feed(new Animal("小猪"));//new Animal("小猪")假设其地址为0x3c
    }

    public static void feed(Animal a) {//Animal a=new Animal(“小白”);
        System.out.println(a.name);    //Animal a= new Animal("小猪");

    }
}
